package com.njit.mailm.core.service;

import com.njit.mailm.core.bean.Draft;
import com.njit.mailm.core.bean.Email;
import com.njit.mailm.core.bean.Page;

import java.util.List;

/**
 * Created by Administrator on 2016/4/21.
 */
public interface DraftService {
    /**
     * 查找id对应的draft的是否存在
     * @param id
     * @return
     */
    Draft getDraftById(String id);

    /**
     * 更新draft
     * @param draft
     */
    void updateDraft(Draft draft);

    /**
     * 添加draft
     * @param draft
     */
    void insertDraft(Draft draft);

    int getDraftTotal(Email email);

    List<Draft> pageListDraft(Page p, Email email);
}
